<template>
	<view class="info_box">
		<rich-text :nodes="info.content" class="content"></rich-text>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				info:{
					content: ''
				}
			}
		},
		onShow() {
		  this.getInfo();	
		},
		methods:{
			getInfo(){
				this.$get(this.$api.my, {}, res => {
					this.info = res.data.data;
					if(this.info.content){
						this.info.content = this.$formatRichText(this.info.content).replace(/src="\//g,
							'src="' + this.$imgUrl + '/');
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.info_box {
		box-sizing: border-box;
		padding: 40rpx;
	}
	image{
		max-width: 100%;
	}
</style>